Translate Keys from Old LMK to New LMK

Command:

Translate keys from encryption under the LMK held in “key change storage” to encryption under a new LMK.

 

Field

Length & Type

Details

COMMAND MESSAGE

Message header

m A

(Subsequently returned to the Host unchanged).

Command code

2 A

Value BW.

Key type code

2 N

Indicates the LMK under which the key is encrypted:

00 : LMK pair 04-05

01 : LMK pair 06-07

02 : LMK pair 14-15

03 : LMK pair 16-17

04 : LMK pair 18-19

05 : LMK pair 20-21

06 : LMK pair 22-23

07 : LMK pair 24-25

08 : LMK pair 26-27

09 : LMK pair 28-29

0A : LMK pair 30-31

0B : LMK pair 32-33

10 : Variant 1 of LMK pair 04-05

42 : Variant 4 of LMK pair 14-15

FF : Use key type specified after delimiter

Key length flag

1 N

0 for single-length key, 1 for double-length key, 3 for triple-length key

Key

16H or 32H or
1A+32H or 1A+48H

Key encrypted under old LMK held in “key change storage”.

Delimiter

1 A

Optional. Only present if following field present. Value “;”.

Key type

3 H

See Key Type Table.

Delimiter

1 A

Optional. If present the following three fields must be present.  Value “;”.

If an option is not required by the command fill with a valid value or 0.

Reserved

1 A

Optional. If present must be 0.

Key scheme LMK

1 A

Optional. Key scheme for encrypting key under LMK.

Reserved

1 A

Optional. If present must be 0.

End message delimiter

1 C

Optional. Must be present if a message trailer is present. Value X’19.

Message trailer

n A

Optional. Maximum length 32 characters.


 

Field

Length & Type

Details

RESPONSE MESSAGE

Message header

m A

Returned to the Host unchanged.

Response code

2 A

Value BX.

Error code

2 N

00 : No errors

04 : Invalid key type code

05 : Invalid key length flag

10 : Key parity error

12 : No keys loaded in user storage

13 : LMK error; report to supervisor

15 : Error in input data

21 : Invalid user storage index

Key

16H or 32H or
1A+32H or 1A+48H

Key encrypted under the new LMK.

End message delimiter

1 C

Present only if present in the command message. Value X’19.

Message trailer

n A

Present only if present in the command message. Maximum length 32 characters.